package com.example.chuntiao.cophook.beans;

/**
 * Created by chuntiao on 17-7-27.
 */

public class PersonHideDataSupport extends BaseDataSupport {
    private String uid;
    private String name;
    private String phone1;
    private String phone2;
    private String PyOfHomeName;
    private String locate;
    private int imgVer;

    public int getImgVer() {
        return imgVer;
    }

    public void setImgVer(int imgVer) {
        this.imgVer = imgVer;
    }

    public String getLocate() {
        return locate;
    }

    public void setLocate(String locate) {
        this.locate = locate;
    }


    public PersonHideDataSupport() {
        super();
        phone2 = "";
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof PersonHideDataSupport)
            return uid.equals(((PersonHideDataSupport) obj).getUid());
        else if (obj instanceof Person)
            return uid.equals(((Person) obj).getUid());
        else
            return uid.equals(((PersonDataSupport) obj).getUid());
    }

    public PersonHideDataSupport(Person instance) {
        uid = instance.getUid();
        name = instance.getName();
        phone1 = instance.getPhone1();
        phone2 = instance.getPhone2();
        PyOfHomeName = instance.getPyOfHomeName();
        locate = instance.getLocate();
        imgVer = instance.getImgVer();
    }

    @Override
    public void set(Object instance) {
        Person personInstance = (Person) instance;
        uid = personInstance.getUid();
        name = personInstance.getName();
        phone1 = personInstance.getPhone1();
        phone2 = personInstance.getPhone2();
        PyOfHomeName = personInstance.getPyOfHomeName();
        locate = personInstance.getLocate();
        imgVer = personInstance.getImgVer();
    }

    public String getUid() {
        return uid;
    }


    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getPhone1() {
        return phone1;
    }

    public void setPhone1(String phone1) {
        this.phone1 = phone1;
    }

    public String getPhone2() {
        return phone2;
    }

    public void setPhone2(String phone2) {
        this.phone2 = phone2;
    }


    public String getPyOfHomeName() {
        return PyOfHomeName;
    }

    public void setPyOfHomeName(String pyOfHomeName) {
        PyOfHomeName = pyOfHomeName;
    }
}
